﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminIndexMaster.master" AutoEventWireup="true" CodeFile="Admin_BackUpDB.aspx.cs" Inherits="Admin_Admin_BackUpDB" %>

 
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript" src="Js/Function.js"></script>   

<table class="adminheading">
<tr><th class="dbrestore">备份数据库</th></tr>
</table>

         <div id="backupdatabase">           
                  <table width="100%" class="nick" cellpadding="1" cellspacing="1" border="0">
                    <tr>
                      <td class="tit" colspan="2">备份数据库</td>                    
                    </tr>
                    <tr>
                      <td class="ltd">备份目录：</td>
                      <td class="rtd"><asp:TextBox ID="BackUpDir" runat="server"  Text="DataBackUp" CssClass="text_area"/>
                         <a href="javascript:void(0)" onclick="return goHelp('config/BackUpDir')" onmouseover="showHelp('help1');" onmouseout="hidenHelp('help1');" ><img src="Images/tooltip.png" border="0" /></a>
                      </td>
                    </tr>
                    <tr>
                      <td class="ltd">备份名称：</td>
                      <td class="rtd">
                         <asp:TextBox ID="BackUpName" runat="server"  CssClass="text_area"/>
                         <a href="javascript:void(0)" onclick="return goHelp('config/BackUpName')" onmouseover="showHelp('help2');" onmouseout="hidenHelp('help2');" ><img src="Images/tooltip.png" border="0" /></a>
                     </td>
                   </tr>
                   <tr>
                      <td class="btm" colspan="2">
			<asp:Label ID="lblbackup" runat="server" />
                    	<asp:Button ID="Btn_BackUp" runat="server" OnClick="Btn_BackUp_Click"  Text="开始备份"  />
                     </td>
                   </tr>			
                 </table>
                 
         </div>
         
         <br />
         <div id="restoredatabase">
              <table width="100%" class="nick" cellpadding="1" cellspacing="1" border="0">
                    <tr>
                    <td class="tit" colspan="2">恢复数据库</td>                    
                 </tr>
                 <tr>
                    <td class="ltd">原备份数据库路径：</td>
                    <td class="rtd"><asp:TextBox ID="RestoreDBName" runat="server"  Text="DataBackUp\VgoShop2008.bak" Width="300px" CssClass="text_area"/>
                        <a href="javascript:void(0)" onclick="return goHelp('config/RestoreDBName')"  onmouseover="showHelp('help3');" onmouseout="hidenHelp('help3');" ><img src="Images/tooltip.png" border="0" /></a>
                        
                    </td>
                 </tr>
                 <tr>
                     <td class="ltd">数据库服务器：</td>
                     <td class="rtd"><asp:TextBox ID="R_DBSource" runat="server" Text="localhost" /></td>
                 </tr>  
                 <tr>
                     <td class="ltd">数据库管理员用户名：</td>
                     <td class="rtd"><asp:TextBox ID="R_DBUser" runat="server" /></td>
                 </tr>
                  <tr>
                     <td class="ltd">数据库管理员密码：</td>
                     <td class="rtd"><asp:TextBox ID="R_DBPassword" runat="server"  TextMode="Password"/></td>
                 </tr>
                 <tr>
                     <td class="btm" colspan="2">
			<asp:Label ID="lblRestore" runat="server" />
	               <asp:Button ID="Btn_RestoreDB" runat="server" OnClick="Btn_RestoreDB_Click"  Text="开始恢复"/>
                     </td>
                 </tr>
            </table>
          
         </div>


 <div id="help1" style="position:absolute;z-index:1; text-align:left; border:solid 1px black; padding:10px; background:white; display:none;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
      <ul>
         <li><b>1：</b>请填写文件夹名，如文件夹不存在，将自动创建</li>
         <li><b>2：</b>若要在上一级新建目录则只需在文件夹名前加上"../"<br />如"../DataBackUp"</li>          
      </ul>   
   </div>
 <div id="help2" style="position:absolute;z-index:1; text-align:left; border:solid 1px black; padding:10px; background:white; display:none;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
      <ul>
         <li>不用输入文件名后缀（默认为“.bak”）。</li>
         <li>请输入一个不规则的数据库名称如"pJf98SF21"以防被人下载，并牢记该备份名</li>            
      </ul>   
   </div>
 <div id="help3" style="position:absolute;z-index:1; text-align:left; border:solid 1px black; padding:10px; background:white; display:none;" onmouseover="this.style.display='';" onmouseout="this.style.display='none'">
      <ul>
         <li>请输入要恢复的数据库备份文件的相对路径</li>
         <li>请不要漏掉文件的后缀名".bak"，否则不能恢复</li>
         <li>若文件在当前文件夹的上一级，只需在文件夹名前加上"../"如"<font color="red">../DataBackUp\VgoShop2008.bak</font>"</li>
         <li>恢复完之后请不要在该页面刷新，否则会再进行一次恢复。</li>
         <li>恢复完点其它页面可能会出现“共享内存出错”这是正常的，只要再重新刷新一次页面就恢复正常</li>               
      </ul>   
   </div>
</asp:Content>
